home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-18 | 3.7 KB | 106 lines | [TEXT/CWIE] |
- /*
- ** Apple Macintosh Developer Technical Support
- **
- ** Defines needed to make a fat sound decompressor and compressor 'thng' resource.
- **
- ** by Mark Cookson, Apple Developer Technical Support
- **
- ** File: ALAW.r
- **
- ** Copyright ©1996 Apple Computer, Inc.
- ** All rights reserved.
- **
- ** You may incorporate this sample code into your applications without
- ** restriction, though the sample code has been provided "AS IS" and the
- ** responsibility for its operation is 100% yours. However, what you are
- ** not permitted to do is to redistribute the source as "Apple Sample
- ** Code" after having made changes. If you're going to re-distribute the
- ** source, we require that you make it clear in the source that the code
- ** was descended from Apple Sample Code, but that you've made changes.
- */
-
- #define UseExtendedThingResource 1 // we want the extended thng resource
- #define SystemSevenOrLater 1 // we only run with System 7, right?
- #define FATCOMPONENT 1
-
- #include "Types.r"
- #include "SysTypes.r"
-
- #define kSoundDecompressor 'sdec'
- #define kSoundCompressor 'scom'
- #define k16BitIn (1 << 2)
- #define k16BitOut (1 << 10)
-
- //#define kRequiredSndMgrMajorRev = 0x03, // 3.0 or later required
- //#define kRequiredSndMgrMinorRev = 0x00
-
- #define kALAWVersion 0x00010000 // version for this sound component
- #define kALAWSubType 'ALAW' // codec type
- #define kManufacturerType 'appl' // manufacturer
-
- #define ALAWDecompressorID 911 // resource ID for MSG decompressor
- #define ALAWCompressorID 912 // resource ID for MSG compressor
-
- #define k68KCodeResType 'cdec' // resource type for 68K code
- #define kPPCCodeResType 'cdek' // resource type for PowerPC code
-
- #define kDecompressorFlags (cmpWantsRegisterMessage | k16BitIn | k16BitOut)
- #define kCompressorFlags (cmpWantsRegisterMessage | k16BitIn | k16BitOut)
-
- // A-Law Decompressor, 68K, PPC
-
- resource 'thng' (ALAWDecompressorID, "A-Law decompressor") {
- kSoundDecompressor, kALAWSubType, kManufacturerType, // types
- kDecompressorFlags, kAnyComponentFlagsMask, // flags
- #if FATCOMPONENT
- k68KCodeResType, ALAWDecompressorID, // code
- #else
- 0, 0, // no 68K code
- #endif
- 'STR ', ALAWDecompressorID, // name
- 'STR ', ALAWDecompressorID+1, // info
- 'ICON', ALAWDecompressorID, // icon
- kALAWVersion, // version
- componentDoAutoVersion | componentHasMultiplePlatforms, // registration flags
- 0, // icon
- {
- #if FATCOMPONENT
- kDecompressorFlags, // flags
- k68KCodeResType, ALAWDecompressorID, // code
- platform68k, // platform
- #endif
- kDecompressorFlags, // flags
- kPPCCodeResType, ALAWDecompressorID, // code
- platformPowerPC // platform
- };
- };
-
- // A-Law Compressor, 68K, PPC
-
- resource 'thng' (ALAWCompressorID, "A-Law compressor") {
- kSoundCompressor, kALAWSubType, kManufacturerType, // types
- kCompressorFlags, kAnyComponentFlagsMask, // flags
- #if FATCOMPONENT
- k68KCodeResType, ALAWCompressorID, // code
- #else
- 0, 0, // no 68K code
- #endif
- 'STR ', ALAWDecompressorID, // name
- 'STR ', ALAWDecompressorID+1, // info
- 'ICON', ALAWDecompressorID, // icon
- kALAWVersion, // version
- componentDoAutoVersion | componentHasMultiplePlatforms, // registration flags
- 0, // icon
- {
- #if FATCOMPONENT
- kCompressorFlags, // flags
- k68KCodeResType, ALAWCompressorID, // code
- platform68k, // platform
- #endif
- kCompressorFlags, // flags
- kPPCCodeResType, ALAWCompressorID, // code
- platformPowerPC // platform
- };
- };
-
-